package com.example.zyflutter.service

import com.example.zyflutter.StoreApiManager
import com.example.zyflutter.utils.LogUtils

class BookStoreApiService : StoreApiManager.StoreApi {
    override fun search(bookName: String): MutableList<StoreApiManager.Book> {
        LogUtils.logE("BookStoreApiService search")
        val list = mutableListOf<StoreApiManager.Book>()

        var book = StoreApiManager.Book()
        book.title = "jpm"
        book.author = "huangz"
        list.add(book)

        book.title = "jpm-2"
        book.author = "huangz-2"
        list.add(book)

        book.title = "jpm-3"
        book.author = "huangz-3"
        list.add(book)

        book.title = "jpm-4"
        book.author = "huangz-4"
        list.add(book)

        book.title = "jpm-5"
        book.author = "huangz-5"
        list.add(book)
        return list
    }

    override fun getBookNames(): MutableList<String> {
        LogUtils.logE("getBookNames")
        return mutableListOf<String>("a", "b", "c", "d", "e")
    }
}